<%@ Page Title="" Language="C#" MasterPageFile="~/SalesOneWeb.Master" AutoEventWireup="true" CodeBehind="DeviceMapping.aspx.cs" Inherits="IronOne.SalesOne.SalesOneWeb.UserManagement.DeviceMapping" %>
<%@ Register src="../UserControls/UCGridPaging.ascx" tagname="UCGridPaging" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

<script language="javascript" type="text/javascript">

        window.onload = function() {
           
            var msg = document.getElementById('ctl00_MasterMsg');
            if(msg && msg.innerHTML != '')
                showMessageBlock();
        }
</script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
    </tr>
  <tr>
    <td><table  border="0" cellspacing="0" cellpadding="0" class="pix8">
      <tr>
        <td width="90">Branch*:</td>
        <td>
            <asp:DropDownList ID="ddlBranch" runat="server" CssClass="ddl" 
                AutoPostBack="True" onselectedindexchanged="ddlBranch_SelectedIndexChanged">
            </asp:DropDownList>
          </td>
      </tr>
      <tr>
        <td class="pix8"></td>
        <td class="pix8"></td>
      </tr>
      <tr>
        <td>Unit:</td>
        <td>
            <asp:DropDownList ID="ddlUnit" runat="server" CssClass="ddl" 
                AutoPostBack="True" onselectedindexchanged="ddlUnit_SelectedIndexChanged">
                <asp:ListItem>Select...</asp:ListItem>
            </asp:DropDownList>
          </td>
      </tr>
      <tr>
        <td class="pix8"></td>
        <td class="pix8"></td>
      </tr>
      <tr>
        <td>SOCode:</td>
        <td>
            <asp:DropDownList ID="ddlSO" runat="server" CssClass="ddl">
                <asp:ListItem>Select...</asp:ListItem>
            </asp:DropDownList>
          </td>
      </tr>
      <tr>
        <td class="pix8"></td>
        <td></td>
      </tr>
      <tr>
        <td colspan="2">
            <asp:Button ID="btnSearch" runat="server" CssClass="btn" Text="Search" 
                EnableViewState="False" onclick="btnSearch_Click" />
           </td>
      </tr>
    </table></td>
    </tr>
  
    <tr>
    <td height="10"></td>
    </tr>
  <tr>
    <td>
        <asp:GridView ID="GridDeviceMapping" runat="server" AutoGenerateColumns="False" 
            onrowdatabound="GridDeviceMapping_RowDataBound" ondatabound="GridDeviceMapping_DataBound" 
            BackColor="#907977" BorderColor="#907977" BorderWidth="1px" 
            CellPadding="3" GridLines="Vertical" BorderStyle="solid">
            <RowStyle BackColor="#f6f6f6" ForeColor="#4A3C8C" BorderColor="#907977" />
            <Columns>
                <asp:BoundField DataField="DeviceId" HeaderText="Device Id" 
                    SortExpression="DeviceId" HeaderStyle-Width="120px"/>
                <asp:BoundField DataField="SOCode" HeaderText="SOCode" 
                    SortExpression="SOCode" HeaderStyle-Width="80px"/>
              <%--  <asp:BoundField DataField="syncDate" HeaderText="Last Sync Date" 
                    SortExpression="syncDate" HeaderStyle-Width="100px"/>--%>
                <asp:TemplateField HeaderText="Last Sync Date" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="100px">
                    <ItemTemplate>
                        <%# Convert.ToString(Eval("syncDate", "{0:dd/MM/yyyy}"))%>                      
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Status" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="60px">
                    <ItemTemplate>
                        <asp:CheckBox ID="cbStatus" runat="server" AutoPostBack="True" 
                            oncheckedchanged="cbStatus_CheckedChanged" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <HeaderStyle BackColor="#ae5044" Font-Bold="True" ForeColor="#F7F7F7" />
            <AlternatingRowStyle BackColor="#cacbcf" />
        </asp:GridView>
      </td>
    </tr>
    <tr><td height="10">
    </td></tr>
  <tr>
    <td>
    
    <table cellpadding="0" cellspacing="0" >
                <tr>
                    <td class="style5"  >
                        <asp:LinkButton ID="lbtPrev" runat="server" onclick="lbtPrev_Click" 
                            Visible="False">Previous</asp:LinkButton>
&nbsp;&nbsp;
                    </td>
                    <td class="style4">
            <asp:TextBox ID="txtPageNo" runat="server"  CssClass="txtbox2"
    Visible="False">1</asp:TextBox>
                    </td>
                    <td>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                                    
    ControlToValidate="txtPageNo" Display="Dynamic" 
                                                    
    ValidationExpression="^\d+$">*</asp:RegularExpressionValidator>
                                                
        
                    </td>
                    <td class="style5"  >
            &nbsp;<asp:LinkButton ID="lbtGo" runat="server" OnClientClick="validationSummery();" onclick="lbtGo_Click" Visible="False">Go</asp:LinkButton>&nbsp;
                    </td>
                    <td class="style5"  >
            &nbsp;&nbsp;
                        <asp:LinkButton ID="lbtNext" runat="server" onclick="lbtNext_Click" 
                            Visible="False">Next</asp:LinkButton>
&nbsp;&nbsp;
        
                    </td>
                </tr>
            </table>
    
    </td>
    </tr>
  <tr>
    <td>&nbsp;</td>
    </tr>
  <tr>
    <td>&nbsp;</td>
    </tr>
  <tr>
    <td>&nbsp;</td>
    </tr>
  <tr>
    <td>&nbsp;</td>
    </tr>
  <tr>
    <td>&nbsp;</td>
    </tr>
</table>
</asp:Content>
